describe('practice-1-4', function () {

    it("抓交通肇事犯，求出肇事车辆的车牌号", function () {
        var str_car_number = catch_traffic_accidents_make();
        console.info('car_number:'+str_car_number);
        expect(str_car_number).toBe(7744);
        var sqrt_number = Math.sqrt(str_car_number);
        var ex = /^\d+$/;
        expect(ex.test(sqrt_number.toString())).toBe(true);
        expect(str_car_number.toString().substr(0,1) === str_car_number.toString().substr(1,1)).toBe(true);
        expect(str_car_number.toString().substr(2,1) === str_car_number.toString().substr(3,1)).toBe(true);
        expect(str_car_number.toString().substr(0,2) === str_car_number.toString().substr(2,2)).toBe(false);
    });

});